﻿using System.ServiceModel;
using System.ServiceModel.Web;
using System.Threading.Tasks;

namespace BattleNet.D3
{
    /// <summary>
    /// 
    /// </summary>
    [ServiceContract]
    public interface ID3Service
    {
        #region GetProfile 

        /// <summary>
        /// 
        /// </summary>
        /// <param name="battletagName"></param>
        /// <param name="battletagCode"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "api/d3/profile/{battletagName}-{battletagCode}/?local={localization}")]
        Profile GetProfile(string battletagName, string battletagCode, string localization);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="battletagName"></param>
        /// <param name="battletagCode"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        Task<Profile> GetProfileAsync(string battletagName, string battletagCode, string localization);

        #endregion

        #region GetHero

        /// <summary>
        /// 
        /// </summary>
        /// <param name="battletagName"></param>
        /// <param name="battletagCode"></param>
        /// <param name="heroId"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "api/d3/profile/{battletagName}-{battletagCode}/hero/{heroId}?locale={localization}")]
        Hero GetHero(string battletagName, string battletagCode, string heroId, string localization);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="battletagName"></param>
        /// <param name="battletagCode"></param>
        /// <param name="heroId"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        Task<Hero> GetHeroAsync(string battletagName, string battletagCode, string heroId, string localization);

        #endregion GetHero

        #region GetItemInformation

        /// <summary>
        /// 
        /// </summary>
        /// <param name="tooltipParams"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "/api/d3/data/{tooltipParams}?locale={localization}")]
        ItemInformation GetItemInformation(string tooltipParams, string localization);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="tooltipParams"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        Task<ItemInformation> GetItemInformationAsync(string tooltipParams, string localization);

        #endregion

        #region GetFollowerInformation

        /// <summary>
        /// 
        /// </summary>
        /// <param name="followerType"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "/api/d3/data/follower/{followerType}?locale={localization}")]
        FollowerInformation GetFollowerInformation(string followerType, string localization);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="followerType"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        Task<FollowerInformation> GetFollowerInformationAsync(string followerType, string localization);

        #endregion

        #region GetArtisanInformation

        /// <summary>
        /// 
        /// </summary>
        /// <param name="artisanType"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "/api/d3/data/artisan/{artisanType}?locale={localization}")]
        ArtisanInformation GetArtisanInformation(string artisanType, string localization);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="artisanType"></param>
        /// <param name="localization"></param>
        /// <returns></returns>
        [OperationContract]
        Task<ArtisanInformation> GetArtisanInformationAsync(string artisanType, string localization);

        #endregion
    }
}
